import store from "../../store/store";
import deleteBatchItems from "./deleteBatchItems";

export default function deleteModule(values) {
    let arr=[];
    arr = JSON.parse(sessionStorage.getItem("getModule"))
    alert(arr.length)

    let status = deleteBatchItems([{
        FILE_ID:values,
        FILE_TYPE:"folder"
    }]);
    if(status=="ok"){
        let arr2=[];
        arr2 = arr.filter(item => item.moduleId != values)
        alert(arr2.length)
        sessionStorage.setItem("getModule",JSON.stringify(arr2))
    }

}